package com.example.demo;

import com.example.demo.controller.TestController;
import com.example.demo.proxy.HouseSubject;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class SpringAopDemoApplication {

	public static void main(String[] args) {
		ApplicationContext context = SpringApplication.run(SpringAopDemoApplication.class, args);
		TestController bean = context.getBean(TestController.class);
		System.out.println(bean.getClass().toString());

		HouseSubject houseSubject = (HouseSubject) context.getBean("realHouseSubject");
		System.out.println(houseSubject.getClass().toString());
	}

}
